from api.login import Login

class Customer(Login):

    def list (self,pagesize = 5,pagenum = 1,**kwargs):
        #登陆
        s,resp = self.login_session('byhy','88888888')

        data = {
            'pagesize':pagesize,
            'pagenum':pagenum,
            'action':'list_customer'
        }
        if kwargs: 
            data.update(kwargs)
        rs = s.get('http://127.0.0.1/api/mgr/customers',params=data)
        return rs